cmake_minimum_required(VERSION 3.4.1)

project(app_jni)

# Although we use c++11 in main histreamer project,
# keep this c++17 to make it compile ok on android ndk.
set(CMAKE_CXX_STANDARD 17)

include_directories(
        ${PLAYER_INTERFACE_DIR}
)

add_library(
        app_jni
        SHARED
        ohos_histreamer_demo_MainActivity.cpp
)

find_library(
        LOG_LIB
        log
)

add_library(SDL2_LIB SHARED IMPORTED)
set_property(TARGET SDL2_LIB PROPERTY IMPORTED_LOCATION ${sdl_lib_path}/libSDL2.so)

add_dependencies(app_jni histreamer)

target_link_libraries(
        app_jni
        ${LOG_LIB}
        ${SDL2_LIB}
        histreamer
)